import dayjs from 'dayjs'
import _relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
dayjs.extend(_relativeTime)

// 返回相对时间
export const relativeTime = (dateStr:string) => {
  return dayjs(dateStr).fromNow()
}
